import java.util.Scanner;
import java.util.Arrays;

class Rectangle{
	private int width;
	private int length;
	
	public Rectangle(int width,int length){
        this.width=width;
        this.length=length;
	}
	@Override
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
    public int getPerimeter(){
        return (2*(this.width+this.length));
    }
    public int getArea(){
        return (this.width*this.length);
    }


}

class Circle{
	private int radius;
	public Circle(int radius){
		this.radius = radius;
	}
	@Override
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	public int getPerimeter(){
		return (int)(2*Math.PI*radius);
	}
	public int getArea(){
		return (int)(Math.PI*radius*radius);
	}
}
public class three {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
        Rectangle[] a1=new Rectangle[2];
        Circle[] a2=new Circle[2];
        int per1 = 0,per2 = 0,area1 = 0,area2 = 0;
        for(int i=0;i<2;i++){
            a1[i]=new Rectangle(in.nextInt(),in.nextInt());
            per1 += a1[i].getPerimeter();
            area1 += a1[i].getArea();
        }
        for (int j = 0; j <2; j++) {
            a2[j] = new Circle(in.nextInt());
            per2 +=a2[j].getPerimeter();
            area2 += a2[j].getArea();
			
		}
            System.out.println(per1+per2);
            System.out.println(area1+area2);
        System.out.println(Arrays.deepToString(a1));
        System.out.println(Arrays.deepToString(a2));

}
}
